package com.kingyun.gpsinspection.purificationservice.facade.service.tdm;


import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.RedisValue;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.*;

import java.util.List;

/**
 * 属地监督业务层
 * Created by sugongche on 2016/1/21.
 */
public interface TerritorialSupervisionService {
    /**
     * 保存信息
     *
     * @param redisValue
     * @param employeeVo
     * @param territorialSupervision
     * @param uploadFiles
     * @param deletedFiles
     * @param workOrderList
     * @param taskRelation
     * @return
     */
    TerritorialSupervision save(RedisValue redisValue, EmployeeVo employeeVo, TerritorialSupervision territorialSupervision, String uploadFiles, String deletedFiles, List<WorkOrderVo> workOrderList, TaskRelation taskRelation);

    /**
     * 更新信息
     *
     *
     * @param redisValue
     * @param employeeVo
     * @param territorialSupervision
     * @param workOrderVoList
     * @return
     * @throws Exception
     */
    int update(RedisValue redisValue, EmployeeVo employeeVo, TerritorialSupervision territorialSupervision, String uploadFiles, String deletedFiles, List<WorkOrderVo> workOrderVoList, TaskLink taskLink);

    /**
     * 根据ID查询对象
     * @param territorialSupervisionId
     * @return
     * @throws Exception
     */
    TerritorialSupervision queryBeanById(String territorialSupervisionId) throws Exception;

    /**
     * 根据ID查询封装对象
     * @param territorialSupervisionId
     * @return
     * @throws Exception
     */
    TerritorialSupervisionVo queryVoById(String territorialSupervisionId) throws Exception;

    /**
     * 根据流程实例ID查询对象
     *
     * @param piPiid
     * @return
     */
    TerritorialSupervisionVo findByPiPiid(String piPiid);

    /**
     * 根据审核保存信息
     *
     * @param redisValue
     * @param taskLink
     * @param workOrderList
     * @param territorialSupervision
     * @param employeeVo
     * @return
     */
    int saveByAudit(RedisValue redisValue, TaskLink taskLink, List<WorkOrderVo> workOrderList, TerritorialSupervision territorialSupervision, EmployeeVo employeeVo) throws Exception;

    /**
     * 根据现场操作步骤保存信息
     *
     *
     * @param redisValue
     * @param employeeVo
     * @param territorialSupervision
     * @param taskLink
     * @return
     */
    int saveBySpotOperation(RedisValue redisValue, EmployeeVo employeeVo, TerritorialSupervision territorialSupervision, TaskLink taskLink);

}
